module.exports = (err,ctx) => {
  console.log(err);
  let status
  // console.log('errCode', err.code);
  switch (err.code) {
    case '10001':
      status = 400
      break;
    case '10002':
      status = 409
      break;
    case '10101' || '10102':
      status = 403
      break;
    default:
      status = 500
      break;
  }
  ctx.status = status
  ctx.body = err
}